home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / maple_st.swf / scripts / DefineSprite_726 / frame_2 / DoAction_2.as next >
Encoding:
Text File  |  2010-04-12  |  925 b   |  31 lines

  1. function stormshoot()
  2. {
  3.    _root.arrowimg = "storm";
  4.    if(_root.mp >= _root.STORMmp)
  5.    {
  6.       _root.mp -= _root.STORMmp;
  7.       duplicateMovieClip("_root.arrows.arrow","arrow" + _root.i,16384 + _root.i);
  8.       arrown = "arrow" + _root.i;
  9.       _root.i += 1;
  10.       arrowy = random(10);
  11.       if(_root.player._xscale >= 0)
  12.       {
  13.          _root.arrows[arrown]._x = _root.player._x - 40.05;
  14.          _root.arrows[arrown]._xscale = _root.player._xscale;
  15.          _root.arrows[arrown]._y = _root.player._y + 46.65;
  16.          _root.arrows[arrown]._y -= arrowy;
  17.       }
  18.       else if(_root.player._xscale < 0)
  19.       {
  20.          _root.arrows[arrown]._x = _root.player._x + 40.05;
  21.          _root.arrows[arrown]._xscale = _root.player._xscale;
  22.          _root.arrows[arrown]._y = _root.player._y + 46.65;
  23.          _root.arrows[arrown]._y -= arrowy;
  24.       }
  25.    }
  26.    else
  27.    {
  28.       gotoAndPlay(25);
  29.    }
  30. }
  31.